package org.example.service.impl;

import org.example.bean.User;
import org.example.mapper.UserMapper;
import org.example.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service("userService")
public class UserServiceImpl implements UserService {
    @Autowired
    UserMapper userMapper;
    @Override
    public User getByUserNameAndPassword(User user) {
        User loginUser = userMapper.getByUserNameAndPassword(user);
        return loginUser;
    }

    @Override
    public User getUser2(String username) {
        User user2 = userMapper.getUser2(username);
        return user2;

    }

    @Override
    public int insUser2(User user) {
        int i = userMapper.insUser2(user);
        return i;
    }


}
